# Contributor: Danct12 <danct12@disroot.org>
# Maintainer: Danct12 <danct12@disroot.org>
pkgname=wayfire
pkgver=0.4.0
pkgrel=1
pkgdesc="Compiz-clone Wayland compositor"
url="https://wayfire.org"
arch="all"
license="MIT"
install="$pkgname.post-install"
makedepends="
	meson
	wlroots-dev
	glm-dev
	wf-config-dev
	cairo-dev
	libexecinfo-dev
	libxml2-dev
	"
options="!check" # no testsuite
subpackages="$pkgname-dev"
source="https://github.com/WayfireWM/wayfire/releases/download/$pkgver/wayfire-$pkgver.tar.xz
	wlroots_0.11.0.patch
	"

build() {
	abuild-meson \
		-Duse_system_wlroots=enabled \
		-Duse_system_wfconfig=enabled \
		. output
	meson compile ${JOBS:+--j ${JOBS}} -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	install -Dm644 wayfire.ini "$pkgdir"/usr/share/wayfire/wayfire.ini.default
	install -Dm644 wayfire.desktop "$pkgdir"/usr/share/wayland-sessions/wayfire.desktop
}

sha512sums="e96cdb90ce36c005476e08608683983aa167e58aea80fcfd3b24ab0836ec4aa50fb5a7eeb0872a1b1014e3073ed826e1c83d3146b39d3cdb2a8b3a0895155649  wayfire-0.4.0.tar.xz
9f6682e14495398f02faf72070820e818b14138d9c6d810454d76209c4582f3edaa7c238448fb2c03f5f51a688311d8e7e338f384f7f51caf7f287dde23c093d  wlroots_0.11.0.patch"
